You can set up fields in your document that display text when a condition that you define is met. For example, you can define the conditional text that is displayed in a series of reminder letters.
フィールドの機能を利用すると、ユーザーの指定条件を満たした場合にのみ、ドキュメント上に特定のテキストを表示させることができます。ここでは条件付きテキストの使用法として、催促状の表示を切り換える場合を例に説明をします。
Setting up conditional text in this example is a two-part process. First you create a variable, and then you create the condition.
条件付きテキストの設定は、大きく分けて 2 つの手順で進めます。まず最初に変数を作成してから、次に条件の設定を行います。
The first part of the example is to define a variable for the condition statement.
ここでの例の最初の手順は、条件ステートメントで使う変数の設定です。
Choose , and then click the tab.
を選択し、タブをクリックします。
Click "Set variable" in the list.
リストの「変数の設定」をクリックします。
Type a name for the variable in the box, for example Reminder.
ボックスに変数の名前を入力します。たとえば Reminder などです。
Click "Text" in the list.
リストの「テキスト」をクリックします。
Enter 1 in the box, and then click .
The Format list now displays a "General" format.
1 をボックスに入力し、をクリックします。
書式リストに「Standard」書式が表示されます。
The second part of the example is to define the condition that must be met, and to insert a placeholder for displaying the conditional text in your document.
この例の 2 番目の部分では、判定条件を設定して、条件付きテキストをドキュメントに表示するためのプレースホルダを挿入する方法を示します。
Place the cursor where you want to insert the conditional text in your text.
ドキュメント上の条件付きテキストを挿入する位置に、カーソルを移動します。
Choose , and then click the tab.
を選択し、タブをクリックします。
Click "Conditional text" in the list.
リストの「条件付きテキスト」をクリックします。
Type Reminder EQ "3" in the box. In other words, the conditional text will be displayed when the variable in the field that you defined in the first part of this example is equal to three.
ボックスに Reminder EQ "3" と入力します。この条件指定の意味は、例の最初の手順で定義したフィールドの変数が 3 に等しくなったとき、条件付きテキストを表示する、という指示です。
The quotation marks enclosing the "3" indicate that the variable that you defined in the first part of this example is a text string.
数値の 3 が引用符で囲んであるのは、ここの解説の最初の手順で、ユーザー定義の変数をテキストと設定したためです。
Type the text that you want to display when the condition is met in the Then box. There is almost no limit to the length of the text that you can enter. You can paste a paragraph into this box.
条件を満たすとき ボックスには、条件が満たされた場合に表示させるテキストを入力します。ここに入力できるテキストの長さには特に制限はありません。必要であれば、1 つの段落全体をコピーしてこのボックスに貼り付けることもできます。
Click Insert, and then click Close.
挿入 をクリックして、閉じる をクリックします。
In this example, the conditional text is displayed when the value of the conditional variable is equal to 3.
ここでの設定例で条件付きテキストが表示されるのは、条件判定用の変数の値が 3 に等しい場合です。
Place your cursor in front of the field that you defined in the first part of this example, and then choose Edit - Fields.
最初の手順で指定したフィールドの先頭部にカーソルを移動して、メニュー 編集 → フィールド を選択します。
Replace the number in the box with 3, and then click .
ボックスの数値を 3 にして、をクリックします。
If the field does not automatically update, press F9.
フィールドが自動的に更新されない場合は F9 キーを押してください。